let connection = require('../db/db.js');

const SQLQuery = {

    query: (sql, SqlParams) => {

        return new Promise((resolve, reject) => {
            connection.query(sql, SqlParams, function (err, result) {
                if (err) {
                    reject(err);
                } else {
                    resolve(result);
                }
            });
        })
    }

}


module.exports = SQLQuery;